package com.hg.wap.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import com.hg.util.action.WapMbaseAction;
import com.hg.wap.service.UserCenterService;
import com.hg.wap.vo.VO4user;

public class UserCenterAction extends WapMbaseAction
{
	UserCenterService service = new UserCenterService();
	public void index(Map root){
		global_run(root);
		
		HttpServletRequest request = (HttpServletRequest) root.get("request");
		HttpSession session = request.getSession();
		
		Map<String,String> m_config=getConfig(root);
		
		VO4user vo = service.findByUsername((String)session.getAttribute("user"));
		
		session.setAttribute("user_info", vo);
		root.put("page_title", "用户中心");
		root.put("m_config", m_config);
		root.put("vo", vo);
		ftl_return(root);
	}
}
